import {
  NDialogProvider,
  NLoadingBarProvider,
  NMessageProvider,
  NNotificationProvider,
} from "naive-ui";
import GlobalInject from "./GlobalInject";
export default defineComponent({
  name: "GlobalProvider",
  setup(_, { slots }) {
    return () => (
      <NDialogProvider>
        <NNotificationProvider>
          <NMessageProvider>
            <NLoadingBarProvider>
              <GlobalInject>{slots?.default && slots.default()}</GlobalInject>
            </NLoadingBarProvider>
          </NMessageProvider>
        </NNotificationProvider>
      </NDialogProvider>
    );
  },
});
